<template>
	<view class="box">
		<!-- 步骤条 -->
		<view class="set-1">
			<template v-if="isShowSee">
				<view class="set-2" :key="index" v-for="(item,index) in options?.slice(-3)"
					:class="{activate:(options?.slice(-3)?.length - 1) === index}">
					<text class="set2-test">{{item.text1}}</text>
					<view class="set-view">
						<view class="steps_title">
							<text>{{item?.scheduleName}}</text>
							<button @click="handleViewProcess" v-if="index === 2">查看全部流程</button>
						</view>
						<view class="steps_info">{{item?.scheduleExplain}}</view>
						<view class="steps_time" v-if="item?.finishTime">{{item?.finishTime}} </view>
					</view>
				</view>
			</template>
			<template v-else>
				<view class="set-2" :key="index" v-for="(item,index) in options"
					:class="{activate:(options?.length - 1) === index}">
					<text class="set2-test">{{item.text1}}</text>
					<view class="set-view">
						<view class="steps_title">
							<text>{{item?.scheduleName}}</text>
							<!-- <button @click="handleViewProcess"
								v-if="options?.length > 3 && options.length - 1 === index && isShowSee">查看全部流程</button> -->
						</view>
						<view class="steps_info">{{item?.scheduleExplain}}</view>
						<view class="steps_time" v-if="item?.finishTime">{{item?.finishTime}} </view>
					</view>
				</view>
			</template>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		props: {
			options: Array, //数据
			isShowSee: {
				type: Boolean,
				default: true
			}
		},
		methods: {
			// 查看流程
			handleViewProcess() {
				this.$emit('handleShow')
			},
		}
	}
</script>

<style lang="scss" scoped>
</style>